<template>
	<div class="app">
		<h2>我是App组件</h2>
		<Child :study="study" :checkDone="checkDone"/>
	</div>
</template>

<script>
	import Child from './components/Child.vue'

	export default {
		name:'App',
		components:{Child},
		data() {
			return {
				study:{
					name:'学习',
					date:'2022-10-24',
					done:true
				}
			}
		},
		methods: {
			checkDone(flag){
				this.study.done = flag
			}
		},
	}
</script>

<style>
	.app {
		background-color: gray;
		padding: 20px;
	}
</style>